package org.mao.forum.enums;

public class ForumTaskEnum {

	public enum ForumEnum {

		SIS(1, "SIS"), LWGOD(2, "LWGOD");

		private Integer type;
		private String desc;

		public Integer getType() {
			return type;
		}

		public String getDesc() {
			return desc;
		}

		private ForumEnum(Integer type, String desc) {
			this.type = type;
			this.desc = desc;
		}

		public Boolean equals(Integer type) {
			if (type == null)
				return false;
			return this.getType().intValue() == type.intValue();
		}
	}

	public enum ForumTaskFrequencyEnum {

		ONCE(1, "只执行一次"), INTELVAL(2, "按时间间隔执行");

		private Integer type;
		private String desc;

		public Integer getType() {
			return type;
		}

		public String getDesc() {
			return desc;
		}

		private ForumTaskFrequencyEnum(Integer type, String desc) {
			this.type = type;
			this.desc = desc;
		}

		public Boolean equals(Integer type) {
			if (type == null)
				return false;
			return this.getType().intValue() == type.intValue();
		}
	}

	public enum ForumTaskStatusEnum {

		WAIT(0, "等待执行"), EXECUTING(1, "正在执行"), OVER(-1, "执行完毕");

		private Integer status;
		private String desc;

		public Integer getStatus() {
			return status;
		}

		public String getDesc() {
			return desc;
		}

		private ForumTaskStatusEnum(Integer status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public Boolean equals(Integer status) {
			if (status == null)
				return false;
			return this.getStatus().intValue() == status.intValue();
		}
	}
}
